{% extends 'home/base.html' %}
{% block content %}
    <div class="container">
        <h3>{{ question.que_title }}</h3>
        <hr>
        <div class="p-2">
            {#    safe: 让jinja2不要对内容中的html标签进行转义     #}
            {{ question.que_content | safe }}
        </div>
        <div class="text-secondary">
            <span>发布时间: {{ question.que_create_time }}</span>
            <span class="ml-2">访问次数: {{ question.que_visit_count }}</span>
            <span class="ml-2">点赞次数: {{ question.que_like_count }}</span>
        </div>

        <form action="#" method="post" class="form mt-3">
            <div class="form-group">
                <textarea required style="resize:none" class="form-control" cols="30" rows="3"
                          placeholder="请输入您的观点"></textarea>
                <small class="form-text text-danger">请输入您的观点内容</small>
            </div>
            {% if not user_login_info %}
                <a onclick="location.href='/login'" class="btn  btn-outline-primary">先去登录</a>
            {% else %}
                <button class="btn  btn-outline-primary rounded-pill">立即发布</button>
            {% endif %}
        </form>
        <hr>
        <h3>网友观点</h3>
        <ul class="list-group list-group-flush shadow-sm">
            {% for item in range(10) %}
                <li class="list-group-item clearfix">
                    <div class="float-left mr-2">
                        <img src="https://picsum.photos/80" style="width: 80px;height: 80px;"
                             class="img-thumbnail rounded-circle"
                             alt="">
                        <p class="text-center">jack</p>
                    </div>
                    <div class="float-left">
                        <p>HTML标签按照显示模式可以分为: 块级标签, 行内标签, 行内块标签...;HTML标签按照显示模式可以分为:
                            块级标签, 行内标签, 行内块标签...</p>
                        <p class="text-mnuted text-left">2025-6-9 20:26</p>
                    </div>
                </li>
            {% endfor %}
        </ul>
    </div>
{% endblock %}